package com.cyloer.abstractory.base;

import com.cyloer.abstractory.service.IConnect;

/**
 * @Description:
 * @author: xiangliu5
 * @date: 2020/10/28 22:23
 */
public class ConnectFactory extends  AbstractConnect {
    @Override
    public <T extends IConnect> T getConnect(Class<T> c) {
        IConnect iConnect=null;
        try {
            iConnect= (T)Class.forName(c.getName()).newInstance();
        }catch (Throwable ex){
            ex.printStackTrace();
        }
        finally {

        }
        return (T)iConnect;
    }
}
